import { useRoutes } from "react-router-dom"
import routes from "./router/index"
import { Suspense } from "react";

const App = () => {
  const element = useRoutes(routes)

  return (
    <>
      <Suspense fallback={<div>loading...</div>}>
        {element}
      </Suspense>
    </>
  )
}

export default App 